package com.example.demo.Shiro.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.example.demo.Shiro.entity.User;
import com.example.demo.Shiro.mapper.UserMapper;
import com.example.demo.Shiro.service.IUserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Optional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 
 * @since 2017-11-23
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
    @Resource
    private UserMapper userMapper;
    @Override
    public User findOneByUserName(String userName) {
        if (userName == null){
            return null;
        }
        return userMapper.findOneByUserName(userName);
    }
}
